﻿@model com.fmtx.Model.Article
@{
    ViewBag.Title = "Edit";
}

<form class="form-horizontal" action="/admin/article/Edit" method="post"  >
        <fieldset>
          <legend>游记编辑 <a href="/admin/article" style="font-size:13px;" >返回</a> </legend>
          <div class="control-group">
            <label class="control-label" for="focusedInput">标题</label>
            <div class="controls">
                @Html.TextBoxFor(m => m.Title, new {@class="input-xlarge focused" })
                <span class="help-inline">@Html.ValidationMessageFor(m=>m.Title)</span>
            </div>
          </div>
            <div class="control-group">
            <label class="control-label">地址</label>
            <div class="controls">
                @Html.TextBoxFor(m => m.Address, new {@class="input-xlarge" })
                <span class="help-inline">@Html.ValidationMessageFor(m=>m.Address)</span>
            </div>
          </div>
            <div class="control-group">
            <label class="control-label">路径</label>
            <div class="controls">
                @Html.TextBoxFor(m => m.AddressUrl, new {@class="input-xlarge" })
                <span class="help-inline">@Html.ValidationMessageFor(m=>m.AddressUrl)</span>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label">景点标签</label>
            <div class="controls">
                @Html.TextBoxFor(m => m.PlaceTag, new {@class="input-xlarge" })
                <span class="help-inline">@Html.ValidationMessageFor(m=>m.PlaceTag)</span>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="disabledInput">关键字</label>
            <div class="controls">
                @Html.TextBoxFor(m => m.KeyWord, new {@class="input-xlarge" })
                <span class="help-inline">@Html.ValidationMessageFor(m=>m.KeyWord)</span>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="inputWarning">简介</label>
            <div class="controls">
              @Html.TextAreaFor(m=>m.Content,new {@class="input-xlarge",style="width:800px;height:500px;" })
              <span class="help-inline">@Html.ValidationMessageFor(m=>m.Content)</span>
            </div>
          </div>
            <div class="control-group">
            <label class="control-label" for="inputWarning">来源</label>
            <div class="controls">
              <a target="_blank" href="@Model.Source" >@Model.Source</a>
            </div>
          </div>
          <div class="form-actions">
              @Html.HiddenFor(m=>m.Id)
            <button type="submit" class="btn btn-primary">保存更改</button>
            <a href="/admin/article/" class="btn">取消</a>
          </div>
        </fieldset>
      </form>
@section scripts{
    @Scripts.Render("~/js/jqueryval")
    <script src="~/js/kindeditor/kindeditor-min.js"></script>
<script type="text/javascript">
    createEditor("#Content");
    $("input[name=CityName]").fmtxDropdown({ url: "/action/area/CityBykey", value: "CityId" });
    $("input[name=PlaceName]").fmtxDropdown({
        url: "/action/area/PlaceBykey", value: "PlaceId", param: "input[name=CityId]", paramkey: "cityid", change: function (id, name) {
            $.get("/action/area/GetCityByPlace", { placeid: id }, function (data) {
                $("input[name=CityName]").val(data.CityName);
                $("input[name=CityId]").val(data.CityId);
            });
        }
    });
</script>
    }